
INC=$(HOME)/include
LINKPATH=../libBioModel

SRCS = *.cpp
OBJD = buildStateSpace_DFS.o anyoption.o $(LINKPATH)/HashTable.o $(LINKPATH)/InitialConds.o $(LINKPATH)/SLinkedList.o $(LINKPATH)/SparseMatrix.o $(LINKPATH)/Stack.o $(LINKPATH)/State.o $(LINKPATH)/StateSpace.o $(LINKPATH)/Stoichiometry.o
OBJB = buildStateSpace_BFS.o anyoption.o $(LINKPATH)/HashTable.o $(LINKPATH)/InitialConds.o $(LINKPATH)/SLinkedList.o $(LINKPATH)/SparseMatrix.o $(LINKPATH)/Queue.o $(LINKPATH)/State.o $(LINKPATH)/StateSpace.o $(LINKPATH)/Stoichiometry.o
#CPP_DEPS = buildStateSpace.d anyoption.d HashTable.d InitialConds.d SLinkedList.d SparseMatrix.d Stack.d State.d StateSpace.d Stoichiometry.d
LIBS := -lm -lxerces-c -lstdc++ -lsbml
LD := $(HOME)/lib


#$(OBJL) : $(SRCS)
%.o : %.cpp
	@echo 'Building file: $<'
	@echo 'Invoking: GCC C++ Compiler'
	g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" -I$(INC) -I/usr/include
	@echo 'Finished building: $<'
	@echo


buildStateSpaceDFS : $(OBJD)
	g++ -o"buildStateSpace_DFS" $(OBJD) -static-libgcc -L$(LD) $(LIBS)

buildStateSpaceBFS : $(OBJB)
	g++ -o"buildStateSpace_BFS" $(OBJB) -static-libgcc -L$(LD) $(LIBS)

all : buildStateSpaceDFS buildStateSpaceBFS install

install:
	cp buildStateSpace_DFS ../bin
	cp buildStateSpace_BFS ../bin


clean:
	rm *.o *.d

mkbin:
	mkdir bin

